package com.example.demo.Controller;

import com.example.demo.POJO.Demo;
import com.example.demo.Service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by liupeng on 2017/12/18.
 */
@RestController
public class DemoController {
    @Autowired
    private DemoService demoService;

    @RequestMapping("/Save")
    public void Save()
    {
        Demo demo = new Demo();
        demo.setUsername("xiaoming");
        demo.setPassword("123456");
        demoService.save(demo);
    }
}
